<!-- Hola sóc el desenvolupador Fèlix fent un comentari -->


<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
		
	 	<%
	 	String name = request.getParameter("username");
	 	String pass = request.getParameter("clau");
	 	String edat = request.getParameter("age");
	 	String correu = request.getParameter("email");
	 	
	 	if(name!=null && name!=""){ 
	 	%>
 		Nom d'usuari: <%= request.getParameter("username") %> <br />
 		<%
	 	}
 		%>
 		<%
	 	if(pass!=null && pass!=""){ 
	 	%>
 		La clau és: <%= request.getParameter("clau") %> <br />
 		<%
	 	}
 		%>
 		<%
	 	if(edat!=null && edat!=""){ 
	 	%>
 		Edat: <%= request.getParameter("age") %> <br />
 		<%
	 	}
 		%>
 		<%
  			String checkbox = request.getParameter("Home");
 			String checkbox2 = request.getParameter("Dona");
 			String[] select = request.getParameterValues("accepta");
 			if (checkbox!=null && checkbox.equalsIgnoreCase("on")) {
		%>
    		Home<br />
		<%
 		}else if(checkbox2!=null && checkbox2.equalsIgnoreCase("on")) {
		%>
			Dona<br />
		<%
		}
		%>
			<%
			if(select[0]!=null && select[0].equalsIgnoreCase("si")){
			%>
	    		Accepta rebre notícies<br />
			<%
	 		}else{
			%>
				No accepta rebre notícies<br />
			<%
			}
			%>
			<%
	 	if(correu!=null && correu!=""){ 
	 	%>
 		Email: <%= request.getParameter("email") %> <br />
 		<%
			}
			%>
</body>
</html>